﻿
Imports occommon
Imports occommon.getResponse

Public Class siteGet
    Inherits [get]

    Public Const _pathidentity As String = network.pathSeperator + path.siteGet

    Shared Sub New()
        assert(Not strstartwith(path.siteGet, network.pathSeperator))
    End Sub

    Public Overrides Function pathidentity() As String
        Return _pathidentity
    End Function

    Protected Overrides Function useUserToLogin() As Boolean
        Return False
    End Function

    Protected Overrides Function responseContent(ByVal site As String, ByVal user As String, _
                                                 ByRef content As String) As Boolean
        assert(Not isemptystring(user))
        assert(Not isemptystring(site))
        Dim s As String = Nothing
        Dim s2 As String = Nothing
        If userSharedCookies(user, s) Or userSiteCookies(user, site, s2) Then
            Return writeContent(content, contentNaming.sharedCookies, s) And _
                   writeContent(content, contentNaming.siteCookies, s2)
        Else
            Return False
        End If
    End Function
End Class
